﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace ShapeDemo.UC.WinProp
{
    /// <summary>
    /// Interaction logic for Ellipse.xaml
    /// </summary>
    public partial class WinPropEllipse : UserControl
    {
        public WinPropEllipse()
        {
            InitializeComponent();
        }

        public double X
        {
            set
            {
                tbX.Text = value.ToString();
            }
        }

        public double Y
        {
            set
            {
                tbY.Text = value.ToString();
            }
        }

        public double Width
        {
            set
            {
                tbWidth.Text = value.ToString();
            }
        }

        public double Height
        {
            set
            {
                tbHeight.Text = value.ToString();
            }
        }

        public void SetValue(ASPNETX_WPFEllipse _wpfellipse)
        {
            X = (double)_wpfellipse.EllipseBody.GetValue(Canvas.LeftProperty);
            Y = (double)_wpfellipse.EllipseBody.GetValue(Canvas.TopProperty);
            Width = _wpfellipse.EllipseBody.Width;
            Height = _wpfellipse.EllipseBody.Height;
        }
    }
}
